home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / torus-sr.tar / torus-sr / torus / robots.h < prev    next >
C/C++ Source or Header  |  1992-03-03  |  3KB  |  112 lines

  1. /*
  2.  * robots.h: include file for the robots game
  3.  */
  4.  
  5. # include <curses.h>
  6. # include <signal.h>
  7. # include <pwd.h>
  8. # include <ctype.h>
  9. # include <sys/types.h>
  10. # include <errno.h>
  11. # ifdef    BSD42
  12. # include <sys/file.h>
  13. # endif BSD42
  14.  
  15. # define MIN_ROBOTS    10    /* no. of robots you start with */
  16. # define MAX_ROBOTS    500    /* maximum robots on a screen    */
  17. # define MIN_VALUE    10    /* what each robot is worth to begin */
  18. # define MAX_FREE    3    /* max free teleports per level    */
  19. # define FASTEST    2    /* the fastest robot (dont fiddle) */
  20.  
  21. # define VERT    '|'        /* vertical wall    */
  22. # define HORIZ    '-'        /* horizontal wall    */
  23. # define ROBOT    '+'        /* normal robot        */
  24. # define FROBOT '#'        /* fast robot        */
  25. # define SCRAP  '@'
  26. # define ME    'I'
  27. # define MUNCH    '*'
  28. # define DOT    '.'
  29.  
  30. # define LEVEL        (level+1)
  31.  
  32. # define MSGPOS        35    /* where messages appear on bottom line */
  33. # define RVPOS        47
  34.  
  35. # define WIDTH          (COLS-2)
  36. # define HEIGHT         (LINES-3)
  37.  
  38. /* These you may want to fiddle with. Position of the two high score files */
  39. /*#ifndef    HOF_FILE
  40. # define HOF_FILE    "/usr2/cwilson/cstuff/torus/lib/robots2_hof"
  41. #endif
  42. #ifndef    TMP_FILE
  43. # define TMP_FILE        "/usr2/cwilson/cstuff/torus/lib/robots2_tmp"
  44. #endif */
  45.  
  46. # define NUMSCORES    10        /* number of people to record */
  47. # define NUMNAME    "Ten"    /* above spelt out */
  48.  
  49. # define TEMP_DAYS    7        /* how long temp scores last */
  50. # define TEMP_NAME    "Week"
  51.  
  52. # define ROBOTOPTS    "ROBOTOPTS"    /* environment tailoring */
  53.  
  54. # define MAXSTR        100
  55.  
  56. # define MULT        1.5        /* multiplier for fast robots */
  57.  
  58. /* if ALLSCORES Undefined - record top n players */
  59. # define ALLSCORES            /* record top n scores */
  60.  
  61. # define SECSPERDAY    86400
  62.  
  63. # define ctrl(x)    ((x)&037)
  64. # define BEL    ctrl('G')
  65.  
  66. # define    abs(X)  ((X) < 0 ? -(X) : (X))
  67. # define    sign(X) ((X) < 0 ? -1 : (X) > 0)
  68.  
  69. extern    char    whoami[];
  70. extern    char    my_user_name[];
  71. extern    char    cmd_ch;
  72.  
  73. extern    bool    moveable_heaps;
  74. extern    bool    show_highscore;
  75. extern  bool    hsew;
  76. extern  bool    vsew;
  77. extern  bool    toral;
  78. extern  bool    hrev;
  79. extern  bool    vrev;
  80. extern  bool    wimpy;
  81. extern  bool    continuous;
  82. extern  bool    all_moves;
  83. extern    bool    last_stand;
  84. extern    bool    bad_move;
  85. extern    bool    running;
  86. extern    bool    waiting;
  87. extern    bool    first_move;
  88. extern    bool    adjacent;
  89. extern    bool    dead;
  90.  
  91. extern    int    my_x, my_y;
  92. extern    int    new_x, new_y;
  93. extern    int    count;
  94. extern    int    free_teleports;
  95. extern    int     dots;
  96. extern    int    robot_value;
  97. extern    int    level;
  98. extern    int    max_robots;
  99. extern    int    scrap_heaps;
  100. extern    int    nrobots_alive;
  101. extern    int    free_per_level;
  102. extern    int    old_free;
  103.  
  104. extern    long    score;
  105. extern    long    lseek();
  106.  
  107. extern    char    *strcpy ();
  108. extern    char    *strncpy ();
  109. extern    char    *malloc ();
  110. extern    char    *gets ();
  111. /* extern    char    *sprintf (); */
  112.